package com.masterrabbit.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.masterrabbit.common.core.annotation.Excel;
import com.masterrabbit.common.core.web.domain.BaseEntity;

/**
 * 订单对象 orders
 * 
 * @author laotu
 * @date 2025-03-19
 */
@Data
public class Orders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID（自增） */
    private Long orderId;

    /** 订单编号（uuid） */
    @Excel(name = "订单编号", readConverterExp = "u=uid")
    private String orderNumber;

    /** userID（商家） */
    @Excel(name = "userID", readConverterExp = "商=家")
    private Long merchantId;

    /** 车辆ID */
    @Excel(name = "车辆ID")
    private Long vehicleId;

    /** userID（客户） */
    @Excel(name = "userID", readConverterExp = "客=户")
    private Long customerId;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderTime;

    /** 预约时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date appointmentTime;

    /** 备注 */
    @Excel(name = "备注")
    private String remarks;

    /** 状态（待支付，待使用） */
    @Excel(name = "状态", readConverterExp = "待=支付，待使用")
    private Long status;

    /** 优惠卷编号（可以为null） */
    @Excel(name = "优惠卷编号", readConverterExp = "可=以为null")
    private String couponCode;

    /** 订单总额 */
    @Excel(name = "订单总额")
    private BigDecimal totalAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal paidAmount;

    /** 商户名 */
    @Excel(name = "商户名")
    private String merchantName;

    /** 服务分类 */
    @Excel(name = "服务分类")
    private String serviceCategory;

    private UserVehicles userVehicles;

    private Merchants merchants;

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setOrderNumber(String orderNumber) 
    {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() 
    {
        return orderNumber;
    }

    public void setMerchantId(Long merchantId) 
    {
        this.merchantId = merchantId;
    }

    public Long getMerchantId() 
    {
        return merchantId;
    }

    public void setVehicleId(Long vehicleId) 
    {
        this.vehicleId = vehicleId;
    }

    public Long getVehicleId() 
    {
        return vehicleId;
    }

    public void setCustomerId(Long customerId) 
    {
        this.customerId = customerId;
    }

    public Long getCustomerId() 
    {
        return customerId;
    }

    public void setOrderTime(Date orderTime) 
    {
        this.orderTime = orderTime;
    }

    public Date getOrderTime() 
    {
        return orderTime;
    }

    public void setAppointmentTime(Date appointmentTime) 
    {
        this.appointmentTime = appointmentTime;
    }

    public Date getAppointmentTime() 
    {
        return appointmentTime;
    }

    public void setRemarks(String remarks) 
    {
        this.remarks = remarks;
    }

    public String getRemarks() 
    {
        return remarks;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCouponCode(String couponCode) 
    {
        this.couponCode = couponCode;
    }

    public String getCouponCode() 
    {
        return couponCode;
    }

    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }

    public void setPaidAmount(BigDecimal paidAmount) 
    {
        this.paidAmount = paidAmount;
    }

    public BigDecimal getPaidAmount() 
    {
        return paidAmount;
    }

    public void setMerchantName(String merchantName) 
    {
        this.merchantName = merchantName;
    }

    public String getMerchantName() 
    {
        return merchantName;
    }

    public void setServiceCategory(String serviceCategory) 
    {
        this.serviceCategory = serviceCategory;
    }

    public String getServiceCategory() 
    {
        return serviceCategory;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderNumber", getOrderNumber())
            .append("merchantId", getMerchantId())
            .append("vehicleId", getVehicleId())
            .append("customerId", getCustomerId())
            .append("orderTime", getOrderTime())
            .append("appointmentTime", getAppointmentTime())
            .append("remarks", getRemarks())
            .append("status", getStatus())
            .append("couponCode", getCouponCode())
            .append("totalAmount", getTotalAmount())
            .append("paidAmount", getPaidAmount())
            .append("merchantName", getMerchantName())
            .append("serviceCategory", getServiceCategory())
            .toString();
    }
}
